<html>
<head>
<meta charset="UTF-8">
<title>流程链接信息修改</title>
<link id="easyuiTheme" href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<link href="../../static/css/esaas-easyui-edit.css" rel="stylesheet" type="text/css"/>
<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
	<script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
	<script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../ffres/dict/all.js" type="text/javascript"></script>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<body class="easyui-layout" scroll="no">
	<form id="ff" method="post">
		<div class="esaas-info-title">流程链接信息信息</div>
		<table class="esaas-info-edit-table">
			<tr>
				<td width="15%" align="right">链接标识：</td>
				<td width="35%"><input class="easyui-textbox" type="text" readOnly
					name="linkedId" data-options="required:true"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">链接类型：</td>
				<td width="35%"><select class="easyui-combobox"
					id="linkedType" name="linkedType"
					style="width: 100%; height: 25px;" 
					data-options="required:false,editable:false,valueField:'enname',textField:'cnname',data:LINKED_TYPE">
				</select></td>
			</tr>
			<tr>
				<td width="15%" align="right">源节点标识：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="sourceNodeId" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">目标节点标识：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="targetNodeId" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">链接描述：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="linkedDesc" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">x1：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="x1" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">y1：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="y1" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
				<td width="15%" align="right">x2：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="x2" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
			<tr>
				<td width="15%" align="right">y2：</td>
				<td width="35%"><input class="easyui-textbox" type="text" 
					name="y2" data-options="required:false"
					style="width: 100%; height: 25px;"></input></td>
			</tr>
		</table>
	</form>
	<div class="esaas-info-buttons">
		<a href="javascript:void(0)" class="easyui-linkbutton " iconCls="icon-ok" onclick="submitForm()" style="width:90px">&nbsp;保&nbsp;存&nbsp;</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="closeForm()" style="width:90px">&nbsp;关&nbsp;闭&nbsp;</a>
	</div>
	<script>

		$(function() {
            addTitle("修改");

            var linkedId = $.getUrlParam('linkedId');
			$.restfulGet('../../api/bpm/linked/info/' + linkedId,null,function(data){
					$('#ff').form('load', {
						linkedId : data.rows.linkedId,
						linkedType : data.rows.linkedType,
						sourceNodeId : data.rows.sourceNodeId,
						targetNodeId : data.rows.targetNodeId,
						linkedDesc : data.rows.linkedDesc,
						x1 : data.rows.x1,
						y1 : data.rows.y1,
						x2 : data.rows.x2,
						y2 : data.rows.y2
					});					
			});
		});
	
		function submitForm() {
			if (!$('#ff').form('validate'))
				return;
			var jsonData = $("#ff").serializeJson();
			$.restfulPut('../../api/bpm/linked/info', jsonData, function(data) {
				window.parent.reloadList();
			});
		};
		
		function closeForm(){
			window.parent.JLEUtil.closewin();
		}
	</script>
</body>
</html>
